/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Current;

import Current.Armory.DefenseArmory;
import Current.Armory.OffenseArmory;
import Current.Armory.SpyDefenseArmory;
import Current.Armory.SpyOffenseArmory;

import java.io.Serializable;

/**
 * @author Fork
 */
public class Armories implements Serializable, Cloneable {

    private OffenseArmory offArmory;
    private DefenseArmory defArmory;
    private SpyOffenseArmory spyOffArmory;
    private SpyDefenseArmory spyDefArmory;
    private UnitTraining units;

    public Armories(UnitTraining Units, OffenseArmory offArmory, DefenseArmory defArmory, SpyOffenseArmory spyOffArmory, SpyDefenseArmory spyDefArmory) {
        this.offArmory = offArmory;
        this.defArmory = defArmory;
        this.spyOffArmory = spyOffArmory;
        this.spyDefArmory = spyDefArmory;
        this.units = Units;
    }

    public Armories(UnitTraining Units) {
        this.offArmory = new OffenseArmory(Units.getTotalSoldiers());
        this.defArmory = new DefenseArmory(Units.getTotalGuards());
        this.spyOffArmory = new SpyOffenseArmory(Units.getTotalSpies());
        this.spyDefArmory = new SpyDefenseArmory(Units.getTotalSentries());
        this.units = Units;
    }

    public DefenseArmory getDefArmory() {
        return defArmory;
    }

    public void setDefArmory(DefenseArmory defArmory) {
        this.defArmory = defArmory;
    }

    public OffenseArmory getOffArmory() {
        return offArmory;
    }

    public void setOffArmory(OffenseArmory offArmory) {
        this.offArmory = offArmory;
    }

    public SpyDefenseArmory getSpyDefArmory() {
        return spyDefArmory;
    }

    public void setSpyDefArmory(SpyDefenseArmory spyDefArmory) {
        this.spyDefArmory = spyDefArmory;
    }

    public SpyOffenseArmory getSpyOffArmory() {
        return spyOffArmory;
    }

    public void setSpyOffArmory(SpyOffenseArmory spyOffArmory) {
        this.spyOffArmory = spyOffArmory;
    }

    public Integer getOffenseBonusFromArmory() {
        return this.offArmory.getTotalOffenseBonus();
    }

    public Integer getDefenseBonusFromArmory() {
        return this.defArmory.getTotalDefenseBonus();
    }

    public Integer getSpyOffenseBonusFromArmory() {
        return this.spyOffArmory.getTotalSpyOffenseBonus();
    }

    public Integer getSpyDefenseBonusFromArmory() {
        return this.spyDefArmory.getTotalSpyDefenseBonus();
    }
}
